package org.darkforest.common.services.impl;

import org.darkforest.common.services.ProxyGoodsService;
import org.darkforest.dao.mapper.ProxyGoodsMapper;
import org.darkforest.model.ProxyGoods;
import org.darkforest.vo.ProxyGoodsPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by valentina on 15/7/1.
 */
@Service
public class ProxyGoodsServiceImpl implements ProxyGoodsService {

//    @Override
//    public ProxyGoodsInfoVo getProxyGoodsInfo(Integer memberId) {
//        return null;
//    }

    @Autowired
    private ProxyGoodsMapper proxyGoodsMapper;

    @Override
    public ProxyGoodsPage getProxyGoodsByTeamId(ProxyGoodsPage proxyGoodsPage) {
        ProxyGoods proxyGoods = new ProxyGoods();
        proxyGoods.setProxyId(proxyGoodsPage.getTeam_id());
        proxyGoodsPage.setResultList(proxyGoodsMapper.findProxyGoodsByCondition(proxyGoods));
        return proxyGoodsPage;
    }
}
